﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;
using System.IO;

namespace SanctusSoftware.CcliSongSelectLib.Management
{
    public class Library : INotifyPropertyChanged
    {

        #region Events

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        #endregion

        #region Properties

        private string _Path = string.Empty;
        public string Path
        {
            get { return _Path; }
            set
            {
                _Path = value;
                OnPropertyChanged("Path");
                IsPathValid = new DirectoryInfo(value).Exists;
            }
        }

        private bool _IncludeSubdirectories = false;
        public bool IncludeSubdirectories
        {
            get { return _IncludeSubdirectories; }
            set
            {
                _IncludeSubdirectories = value;
                OnPropertyChanged("IncludeSubdirectories");
            }
        }

        private bool _IsPathValid = false;
        public bool IsPathValid
        {
            get { return _IsPathValid; }
            private set
            {
                _IsPathValid = value;
                OnPropertyChanged("IsPathValid");
            }
        }

        #endregion

    }
}
